package demo5.controller;

import demo5.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * controller将来会处理用户的请求
 *
 */
@Component
public class UserController {
    @Autowired
    private IUserService userService;


    public void doLogin(){
        System.out.println("UserController:收到用户请求，要求登录");
        boolean success = userService.login("鞠婧祎", "123456");
        if (success){
            System.out.println("UserController:登录成功");
        }else{
            System.out.println("UserController:登录失败");
        }
    }

}
